{	Problem: http://codeforces.ru/problemset/problem/31/A
 	Verdict: Accepted
}
var i,n,j,k:longint; a:array[1..1010] of longint; r:boolean;
begin
read(n);
for I:=1 to n do read(a[i]);
r:=false;
for i:=1 to n do
  for j:=1 to n do
    for k:=1 to n do
      if (a[i]=a[j]+a[k]) and (not r) and (i<>j) and (j<>k) and (i<>k) then begin
        write(i,' ',j,' ',k);
        r:=true;
      end;
if not r then write(-1);
end.